package com.zjy.pgcms.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.sun.xml.internal.ws.developer.Serialization;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 
 * @TableName reservation
 */
@TableName(value ="reservation")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Reservation implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;

    /**
     * 
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long petId;

    /**
     * 
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long projectId;

    /**
     * 
     */
    private Date time;


    /**
     * 
     */
    private int status;

    /**
     * 
     */
    @TableLogic
    private Byte deleteStatus;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public Reservation(Long petId, Long projectId) {
        this.petId = petId;
        this.projectId = projectId;
    }

    public Reservation(Long userId, Long petId, Long projectId, Date time) {
        this.userId = userId;
        this.petId = petId;
        this.projectId = projectId;
        this.time = time;
    }
}